<script>
	import {getToken} from "./utils/auth.js"
	import {setStatuBarHeight} from "./utils/system.js"
	import {initWebsocket,openWebsocket} from "./websocket/init.js"
	export default {
		onLaunch: function() {
			console.log('App Launch')
			setStatuBarHeight()
			let token = getToken()
			console.log(token)
			initWebsocket()
			if(!token){
				uni.reLaunch({
					url:"/pagesE/login/index"
				})
			}else{
				openWebsocket()
			}
		},
		onShow: function() {
			console.log('App Show')
			setStatuBarHeight()
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
<style lang="scss">
	@import "@/uni_modules/uview-plus/index.scss";
</style>
